package cn.fenqing168.springcloud.service.feign;

import cn.fenqing168.springcloud.service.feign.impl.PaymentHystrixFiegnServiceImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author Administrator
 */
@FeignClient(value = "CLOUD-PROVIDER-HYSTRIX-PAYMENT", fallback = PaymentHystrixFiegnServiceImpl.class)
public interface PaymentHystrixFiegnService {

    /**
     * 成功的方法
     * @param id
     * @return
     */
    @GetMapping("/payment/hystrix/ok/{id}")
    String paymentInfoOk(@PathVariable("id") Long id);

    /**
     * 超时的接口
     * @param id
     * @return
     */
    @GetMapping("/payment/hystrix/timeout/{id}")
    String paymentInfoTimeout(@PathVariable("id") Long id);

}
